package com.meixiang.activity.account.manager;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.meixiang.R;
import com.meixiang.activity.account.manager.PayPassWordActivity;
import com.meixiang.activity.account.manager.PaymentCodeActivity;
import com.meixiang.main.BaseActivity;
import com.meixiang.view.TitleView;
import com.meixiang.view.PaymentKeyDialog;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 修改支付密码   验证原支付密码
 *
 * @author zys
 */
public class VerifyOriginalPaymentPasswordActivity extends BaseActivity {

    @Bind(R.id.title)
    TitleView title;
    @Bind(R.id.password)
    PaymentKeyDialog password;

    private String ClassStatus;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_verify_original_password);
        ButterKnife.bind(this);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void initTitle() {
        title.setTitle(R.string.change_pay_off_password);
        title.setLeftImageButton(R.mipmap.back);
        title.showLeftButton(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    protected void initView() {

        password.setKeyTitle(R.string.verify_old_pay_off_password);

        ClassStatus = getIntent().getExtras().getString("ClassStatus");
//        1. 的到上一个页面传的状态 更具不同的状态跳不同的页面
        if(ClassStatus.equals("a")){
            password.setKeyTitle(R.string.change_pay_off_password);
        }if(ClassStatus.equals("2")){
            password.setKeyTitle(R.string.repeatpay_new_password_pay_off);
        }if(ClassStatus.equals("3")){
//            password.juumActivity(PaymentCodeActivity.class,ClassStatus);
            startActivity(new Intent(this, PaymentCodeActivity.class));
            finish();
            return;
        }
        password.juumActivity(PayPassWordActivity.class,ClassStatus);
    }

    @Override
    protected void setData() {

    }

    @Override
    public void onClick(View v) {

    }


}
